From 6aaa032c24b31c5dfd088f75717a52d5bc70b0e7 Mon Sep 17 00:00:00 2001 From: "cl349@freefall.cl.cam.ac.uk" Date: Sun, 1 Aug 2004 15:21:46 +0000 Subject: [PATCH] bitkeeper revision 1.1108.33.23 (410d0a8aWM5n48Ku4nUKCSOzCx9B2A) sync with 2.4 block backend driver: always print error messages --- .../drivers/xen/blkback/common.h | 3 +++ .../drivers/xen/blkback/vbd.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h b/linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h index 9fa93813cc..dc4bcf0728 100644 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkback/common.h @@ -36,6 +36,9 @@ #define DPRINTK(_f, _a...) ((void)0) #endif +#define PRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \ + __FILE__ , __LINE__ , ## _a ) + typedef struct blkif_st { /* Unique identifier for this interface. */ domid_t domid; diff --git a/linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c b/linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c index bda17b1752..540a8c1f3b 100644 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkback/vbd.c @@ -20,7 +20,7 @@ void vbd_create(blkif_be_vbd_create_t *create) blkif = blkif_find_by_handle(create->domid, create->blkif_handle); if ( unlikely(blkif == NULL) ) { - DPRINTK("vbd_create attempted for non-existent blkif (%u,%u)\n", + PRINTK("vbd_create attempted for non-existent blkif (%u,%u)\n", create->domid, create->blkif_handle); create->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND; return; @@ -43,7 +43,7 @@ void vbd_create(blkif_be_vbd_create_t *create) } else { - DPRINTK("vbd_create attempted for already existing vbd\n"); + PRINTK("vbd_create attempted for already existing vbd\n"); create->status = BLKIF_BE_STATUS_VBD_EXISTS; goto out; } @@ -51,7 +51,7 @@ void vbd_create(blkif_be_vbd_create_t *create) if ( unlikely((vbd = kmalloc(sizeof(vbd_t), GFP_KERNEL)) == NULL) ) { - DPRINTK("vbd_create: out of memory\n"); + PRINTK("vbd_create: out of memory\n"); create->status = BLKIF_BE_STATUS_OUT_OF_MEMORY; goto out; } @@ -89,7 +89,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow) blkif = blkif_find_by_handle(grow->domid, grow->blkif_handle); if ( unlikely(blkif == NULL) ) { - DPRINTK("vbd_grow attempted for non-existent blkif (%u,%u)\n", + PRINTK("vbd_grow attempted for non-existent blkif (%u,%u)\n", grow->domid, grow->blkif_handle); grow->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND; return; @@ -111,7 +111,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow) if ( unlikely(vbd == NULL) || unlikely(vbd->vdevice != vdevice) ) { - DPRINTK("vbd_grow: attempted to append extent to non-existent VBD.\n"); + PRINTK("vbd_grow: attempted to append extent to non-existent VBD.\n"); grow->status = BLKIF_BE_STATUS_VBD_NOT_FOUND; goto out; } @@ -119,7 +119,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow) if ( unlikely((x = kmalloc(sizeof(blkif_extent_le_t), GFP_KERNEL)) == NULL) ) { - DPRINTK("vbd_grow: out of memory\n"); + PRINTK("vbd_grow: out of memory\n"); grow->status = BLKIF_BE_STATUS_OUT_OF_MEMORY; goto out; } @@ -138,7 +138,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow) #if 0 if( !blk_size[MAJOR(x->extent.device)] ) { - DPRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device); + PRINTK("vbd_grow: device %08x doesn't exist.\n", x->extent.device); grow->status = BLKIF_BE_STATUS_EXTENT_NOT_FOUND; goto out; } @@ -149,7 +149,7 @@ void vbd_grow(blkif_be_vbd_grow_t *grow) if ( x->extent.sector_start > 0 ) { - DPRINTK("vbd_grow: device %08x start not zero!\n", x->extent.device); + PRINTK("vbd_grow: device %08x start not zero!\n", x->extent.device); grow->status = BLKIF_BE_STATUS_EXTENT_NOT_FOUND; goto out; } @@ -251,7 +251,7 @@ void vbd_destroy(blkif_be_vbd_destroy_t *destroy) blkif = blkif_find_by_handle(destroy->domid, destroy->blkif_handle); if ( unlikely(blkif == NULL) ) { - DPRINTK("vbd_destroy attempted for non-existent blkif (%u,%u)\n", + PRINTK("vbd_destroy attempted for non-existent blkif (%u,%u)\n", destroy->domid, destroy->blkif_handle); destroy->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND; return; -- 2.30.2